﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:ctrls="clr-namespace:Odyssey.Controls;assembly=Odyssey"
    xmlns:vm="clr-namespace:OdcTest.ViewModels"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Custom="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
    xmlns:bh="clr-namespace:Odyssey.Behaviors;assembly=Odyssey" 
    xmlns:ia="clr-namespace:Odyssey.Interactivity;assembly=Odyssey"
    xmlns:fx="clr-namespace:Odyssey.Effects;assembly=Odyssey"
    xmlns:sys="clr-namespace:System;assembly=mscorlib"
    x:Class="OdcTest.Views.DetailPage"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="768" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" DataContext="{StaticResource pickersViewModel}">



    <phone:PhoneApplicationPage.Resources>
        <bh:SwivelEffectBehavior x:Key="swivelFx" Angle="80" WaitUntilCompleted="False" />
        <bh:SwingEffectBehavior x:Key="longSwingFx" Duration="0:0:0.40" Angle="-73" WaitUntilCompleted="False" IsEnabled="True" />
        <bh:ContinuumEffectBehavior x:Key="longContinuumFx" Duration="0:0:0.35" Mode="Detail" WaitUntilCompleted="False"  IsEnabled="True"  />
        <bh:SwingEffectBehavior x:Key="swingFx" Duration="0:0:0.25" Angle="-73" WaitUntilCompleted="True" IsEnabled="True" />
        <bh:ContinuumEffectBehavior x:Key="continuumFx" Duration="0:0:0.25" Mode="Detail" WaitUntilCompleted="True" BackDelay="0:0:0.02" IsEnabled="True" />
    </phone:PhoneApplicationPage.Resources>
    
    <Custom:Interaction.Triggers>
        <ia:MessageEventTrigger EventName="OkClick" Text="Save changings?" Caption="Confirm">
            <ia:GoBackAction/>
        </ia:MessageEventTrigger>
        <ia:DelayedEventTrigger EventName="CancelClick">
            <ia:GoBackAction/>
        </ia:DelayedEventTrigger>
    </Custom:Interaction.Triggers>


    <Grid x:Name="LayoutRoot" Background="Transparent" CacheMode="BitmapCache">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="ODYSSEY" Style="{StaticResource PhoneTextNormalStyle}" fx:ContinuumEffect.IsItem="True" CacheMode="BitmapCache" />
            <TextBlock x:Name="PageTitle" Text="details" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" fx:ContinuumEffect.Slide="False"/>
        </StackPanel>

        <StackPanel x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0" fx:ContinuumEffect.Slide="True">
            <!--<TextBlock TextWrapping="Wrap"  CacheMode="BitmapCache"
                       Text="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum"/>-->
            <TextBlock Text="choose date" Style="{StaticResource PhoneTextSubtleStyle}"/>

            <ctrls:DatePickerBox SelectedItem="{Binding Date}"/>

            <TextBlock Height="24"/>
            <TextBlock Text="choose time" Style="{StaticResource PhoneTextSubtleStyle}"/>

            <ctrls:TimePickerBox SelectedItem="{Binding Time}"/>

            <TextBlock Height="24"/>
            <TextBlock Text="choose from 4 items" Style="{StaticResource PhoneTextSubtleStyle}"/>
            <ctrls:DropDown>
                <ctrls:DropDownItem Content="Item 1"/>
                <ctrls:DropDownItem Content="Item 2"/>
                <ctrls:DropDownItem Content="Item 3"/>
                <ctrls:DropDownItem Content="Item 4"/>
            </ctrls:DropDown>

            <TextBlock Height="24"/>
            <TextBlock Text="choose item" Style="{StaticResource PhoneTextSubtleStyle}"/>

            <ctrls:ListPicker SelectedItem="{Binding SelectedItem, Mode=TwoWay}" ItemsSource="{Binding Items}" Title="CHOOSE ITEM">
                <ctrls:ListPicker.ContentTemplate>
                    <DataTemplate>
                        <TextBlock Text="{Binding Name}"  VerticalAlignment="Center" />
                    </DataTemplate>
                </ctrls:ListPicker.ContentTemplate>
                <ctrls:ListPicker.ItemTemplate>
                    <DataTemplate>
                        <Border Height="80">
                            <TextBlock x:Name="text" Text="{Binding Name}"  
                                               Margin="{StaticResource PhoneTouchTargetOverhang}"
                                               FontSize="{StaticResource PhoneFontSizeExtraLarge}" VerticalAlignment="Center"/>
                        </Border>
                    </DataTemplate>
                </ctrls:ListPicker.ItemTemplate>
            </ctrls:ListPicker>
        </StackPanel>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="False">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.check.rest.png" Text="OK" Click="OnOKClick"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar.cancel.rest.png" Text="Cancel" Click="OnCancelClick"/>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

</phone:PhoneApplicationPage>
